/* ==================================================
   STYLE COMMUN : barre de navigation + pied de page
   (à relier sur TOUTES les pages)
================================================== */

/* ---------- 0. STABILITÉ : le menu ne bouge plus d'une page à l'autre ---------- */

/* Réserve toujours la place de la barre de défilement :
   sans ça, le menu se décale de ~15px entre une page longue et une page courte */
html {
    scrollbar-gutter: stable;
}

@supports not (scrollbar-gutter: stable) {
    html {
        overflow-y: scroll;
    }
}

/* Supprime la marge de 8px que le navigateur ajoute par défaut */
body {
    margin: 0;
}

/* Empêche l'effet "élastique" : quand on tire la page au-delà de son début,
   de sa fin ou sur le côté, elle ne se déplace plus et ne laisse plus voir le fond */
html,
body {
    overscroll-behavior: none;
}


/* ---------- 1. BARRE DE NAVIGATION ---------- */

.entete-site {
    width: 100%;
    min-height: 80px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 10px 5%;

    background-color: #c2e091;
    border-bottom: 1px solid #e7ebf0;

    position: relative;
    z-index: 10;

    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
}

.entete-site,
.pied-site,
.entete-site *,
.pied-site * {
    box-sizing: border-box;
}

.entete-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.entete-logo img {
    width: 165px;
    height: 60px;
    object-fit: contain;
    display: block;
}

.entete-nav ul {
    display: flex;
    align-items: center;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.lien-site {
    display: inline-block;
    padding: 8px 0;

    color: #263247;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;

    border-bottom: 2px solid transparent;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.lien-site:hover,
.lien-site.active {
    color: #176b38;
}

.lien-site.active {
    border-bottom-color: #176b38;
}

/* Lien affiché comme un bouton (Contact) */
.lien-site.lien-bouton {
    padding: 8px 0;

    color: #263247;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;

    border-bottom: 2px solid transparent;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.lien-site:hover,
.lien-site.active {
    color: #263247;
    border-bottom-color: #176b38;
}

/* Bouton ☰ (caché sur ordinateur) */
.entete-burger {
    display: none;

    width: 44px;
    height: 44px;
    padding: 0;

    background: transparent;
    border: 2px solid #263247;
    border-radius: 8px;
    cursor: pointer;

    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.entete-burger span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: #263247;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.entete-burger:focus-visible {
    outline: 3px solid #176b38;
    outline-offset: 2px;
}

.entete-site.ouvert .entete-burger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.entete-site.ouvert .entete-burger span:nth-child(2) {
    opacity: 0;
}

.entete-site.ouvert .entete-burger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* ---------- 2. PIED DE PAGE ---------- */

.pied-site {
    padding: 50px 7% 22px;

    background-color: #102d55;
    color: #ffffff;

    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
}

.pied-contenu {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;

    max-width: 1200px;
    margin: 0 auto 35px;
}

.pied-logo {
    display: inline-block;
    margin-bottom: 18px;
    padding: 8px 14px;

    background-color: #c2e091;
    border-radius: 10px;
    text-decoration: none;
}

.pied-logo img {
    width: 150px;
    height: 54px;
    object-fit: contain;
    display: block;
}

.pied-marque p {
    max-width: 420px;
    margin: 0;

    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.9;
}

.pied-liens {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.pied-liens h4 {
    margin: 0 0 14px;
    font-size: 15px;
    letter-spacing: 0.5px;
}

.pied-liens a {
    margin-bottom: 9px;

    color: #cbd5e1;
    font-size: 14px;
    text-decoration: none;

    transition: color 0.3s ease;
}

.pied-liens a:hover {
    color: #75d5a1;
}

.pied-bas {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 20px;

    border-top: 1px solid rgba(255, 255, 255, 0.15);

    color: #cbd5e1;
    font-size: 12px;
    text-align: center;
}

.pied-bas p {
    margin: 0;
}

.pied-bas p+p {
    margin-top: 4px;
    color: #94a3b8;
}


/* ---------- 3. TABLETTES ---------- */

@media screen and (max-width: 1000px) {

    .entete-site {
        padding: 10px 3%;
    }

    .entete-nav ul {
        gap: 18px;
    }
}

@media screen and (max-width: 900px) {

    .pied-contenu {
        grid-template-columns: 1fr 1fr;
    }

    .pied-marque {
        grid-column: 1 / -1;
    }
}


/* ---------- 4. TÉLÉPHONES : menu "hamburger" ---------- */

@media screen and (max-width: 860px) {

    .entete-site {
        flex-wrap: wrap;
        padding: 10px 5%;
    }

    .entete-burger {
        display: flex;
    }

    /* Le menu est caché tant qu'on n'appuie pas sur ☰ */
    .entete-nav {
        display: none;
        width: 100%;
        padding: 6px 0 10px;
    }

    .entete-site.ouvert .entete-nav {
        display: block;
    }

    .entete-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .entete-nav li {
        border-top: 1px solid rgba(38, 50, 71, 0.15);
    }

    .lien-site {
        display: block;
        padding: 13px 4px;
        font-size: 16px;
        border-bottom: none;
    }

    .lien-site.active {
        border-bottom: none;
    }

    .entete-nav li:last-child {
        padding-top: 12px;
    }

    .lien-site.lien-bouton {
        text-align: center;
        padding: 13px 20px;
    }
}

@media screen and (max-width: 600px) {

    .entete-logo img {
        width: 145px;
        height: 50px;
    }

    .pied-contenu {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}